:root {
    --primary: #1877F2;
    --primary-light: #E8F3FF;
    --secondary: #65676B;

    /*--primary: #4F46E5;
    --primary-light: #EEF2FF;
    --secondary: #EC4899;*/

    --light-bg: #F0F2F5;
    --dark-bg: #1C1E21;
    --text-light: #8A8D91;
    --text-white: #FFFFFF;
    --border-color: #2F3336;
    --dark: #1E293B;
    --light: #F8FAFC;
    --gray: #64748B;
    --light-gray: #F1F5F9;
    --border: #E2E8F0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius: 8px;


    --success: #52C41A;
    --warning: #FAAD14;
    --danger: #FF4D4F;
    --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.1);


    --primary-dark: #4338CA;

    --dark-gray: #374151;
    --text-dark: #1F2937;
    --transition: all 0.25s ease;
}

/* 基础共享样式 */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
}


/** Grid布局:12列 8列 span 8 **/
.col-span-8 {
    grid-column: span 8;
}

.col-span-4 {
    grid-column: span 4;
}

.col-span-6 {
    grid-column: span 6;
}

/*** 其他：内部div分列 ***/
.flex {
    display: flex;
}

/*** 其他：内部最后一个div剩余部分 ***/
.flex-grow {
    flex-grow: 1;
}

/****   顶部开始     ****/
.header-style {
    margin-bottom: 3rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 顶部 通用组件样式 */
.header-style .top-links, .header-style .logo-section, .header-style .main-nav {
    padding: 0.5rem 0;
}

.header-style .container {
    padding-left: 1rem;
    padding-right: 1rem;
}

.header-style .link-with-icon {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-style .nav-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-style .user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-style .auth-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.header-style .search-bar {
    position: relative;
}

.header-style .search-input {
    padding: 0.375rem 0.75rem 0.375rem 2rem;
    border-radius: 20px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.header-style .search-input:focus {
    outline: none;
    width: 250px;
}

.header-style .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
}

/* 顶部 样式1：标准蓝白风格 */
.style-1 .top-links {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.style-1 .top-links .link-with-icon {
    color: #64748b;
    font-size: 0.875rem;
}

.style-1 .top-links .link-with-icon:hover {
    color: #2563eb;
}

.style-1 .logo-section {
    background-color: white;
    border-bottom: 1px solid #e2e8f0;
}

.style-1 .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.style-1 .logo-icon {
    font-size: 2rem;
    color: #2563eb;
}

.style-1 .site-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
}

.style-1 .main-nav {
    background-color: white;
    border-bottom: 1px solid #e2e8f0;
}

.style-1 .nav-link {
    color: #334155;
    font-weight: 500;
    border-radius: 4px 4px 0 0;
}

.style-1 .nav-link:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

.style-1 .nav-link.active {
    color: #2563eb;
    background-color: #eff6ff;
    border-bottom: 3px solid #2563eb;
}

.style-1 .search-input {
    border: 1px solid #cbd5e1;
    width: 200px;
}

.style-1 .search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.style-1 .search-icon {
    color: #94a3b8;
}

.style-1 .user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 600;
}

/* 顶部 样式2：深色风格 */
.style-2 .top-links {
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
}

.style-2 .top-links .link-with-icon {
    color: #94a3b8;
    font-size: 0.875rem;
}

.style-2 .top-links .link-with-icon:hover {
    color: #bfdbfe;
}

.style-2 .logo-section {
    background-color: #0f172a;
    border-bottom: 1px solid #334155;
}

.style-2 .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.style-2 .logo-icon {
    font-size: 2rem;
    color: #93c5fd;
}

.style-2 .site-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f8fafc;
}

.style-2 .main-nav {
    background-color: #0f172a;
    border-bottom: 1px solid #334155;
}

.style-2 .nav-link {
    color: #e2e8f0;
    font-weight: 500;
    border-radius: 4px 4px 0 0;
}

.style-2 .nav-link:hover {
    color: #93c5fd;
    background-color: #1e293b;
}

.style-2 .nav-link.active {
    color: #93c5fd;
    background-color: #1e293b;
    border-bottom: 3px solid #93c5fd;
}

.style-2 .search-input {
    border: 1px solid #334155;
    background-color: #1e293b;
    color: #e2e8f0;
    width: 200px;
}

.style-2 .search-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.2);
}

.style-2 .search-icon {
    color: #94a3b8;
}

.style-2 .user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e2e8f0;
    font-weight: 600;
}

.style-2 .user-name {
    color: #f8fafc;
}

/* 顶部 样式3：简约风格 */
.style-3 .top-links {
    background-color: white;
    border-bottom: 1px solid #f1f5f9;
}

.style-3 .top-links .link-with-icon {
    color: #64748b;
    font-size: 0.875rem;
}

.style-3 .top-links .link-with-icon:hover {
    color: #0f172a;
}

.style-3 .logo-section {
    background-color: white;
    border-bottom: 1px solid #f1f5f9;
}

.style-3 .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.style-3 .logo-icon {
    font-size: 2rem;
    color: #0f172a;
}

.style-3 .site-name {
    font-size: 1.75rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.5px;
}

.style-3 .main-nav {
    background-color: white;
    border-bottom: 1px solid #f1f5f9;
}

.style-3 .nav-link {
    color: #64748b;
    font-weight: 500;
    border-radius: 0;
    position: relative;
}

.style-3 .nav-link:hover {
    color: #0f172a;
}

.style-3 .nav-link.active {
    color: #0f172a;
    font-weight: 600;
}

.style-3 .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #0f172a;
}

.style-3 .search-input {
    border: 1px solid #e2e8f0;
    width: 200px;
}

.style-3 .search-input:focus {
    border-color: #0f172a;
    box-shadow: none;
}

.style-3 .search-icon {
    color: #94a3b8;
}

.style-3 .user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-weight: 600;
}

/****   顶部结束     ****/

/* 二级导航栏样式 */
.header-style .subnav {
    background-color: #f5f7fa;
    border-top: 1px solid #eee;
}

.header-style .subnav .subnav-link {
    color: #666;
    padding: 10px 16px;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
}

.header-style .subnav .subnav-link:hover, .subnav-link.active {
    color: #165DFF;
    border-bottom: 2px solid #165DFF;
}

/* 下拉菜单样式 */
.header-style .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: none;
}

.header-style .dropdown-item {
    padding: 8px 16px;
    transition: background-color 0.2s;
}

.header-style .dropdown-item:hover {
    background-color: #f5f7fa;
    color: #165DFF;
}

/*  焦点图 开始 */
/* 通用轮播样式 */
.custom-carousel {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

.custom-carousel:hover {
    transform: translateY(-5px) scale(1.01); /* 轻微上浮和放大 */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.custom-carousel:hover .carousel-caption {
    /*background: linear-gradient(transparent, rgba(0, 0, 0, 1));*/
    background: linear-gradient(rgba(250, 250, 250, 0.3), rgba(0, 0, 0, 1));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); /* 加深阴影 */
}


/* 焦点图轮播 */
.hero-carousel .carousel-item {
    /*height: 100%;*/
    min-height: 500px;
    position: relative;
}

.hero-carousel .carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-carousel .carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    text-align: left;
}

.hero-carousel .carousel-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-carousel .carousel-text {
    font-size: 1rem;
    max-width: 700px;
    margin-bottom: 1rem;
}

.hero-carousel .carousel-user {
    display: flex;
    align-items: center;
}

.hero-carousel .carousel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.hero-carousel .carousel-username {
    color: white;
    font-weight: 500;
}

/**  轮播图旁边：文章卡片  **/
.div-carousel .article-card:hover {
    transform: translateY(-3px) scale(1.01); /* 内容卡片上浮 放大*/
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2); /* 加深阴影 */
}

.div-carousel .article-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: calc(250px - 0.75rem); /* 上下各占一半高度，减去间距 */
    display: flex;
    flex-direction: column;
}

.div-carousel .article-card .article-img {
    height: 60%;
    overflow: hidden;
}


/*  焦点图 结束 */

/* 列表里面多行二级栏目 开始 */
/* 多行二级栏目 下面是各种列表：cate-content-lists  */
.cate-content-lists {
    background-color: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1rem;
}

.cate-content-lists .cate-section {
    margin-bottom: 1.5rem;
}

.cate-content-lists .cate-section:last-child {
    margin-bottom: 0;
}

.cate-content-lists  .cate-main-category {
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
}

.cate-content-lists .cate-main-category i {
    color: var(--primary);
}

.cate-content-lists  .cate-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    overflow-x: auto;
}

.cate-content-lists .cate-section .cate-subcategory {
    /*如果多栏目中筛选，这栏目展示要小一些*/
    padding: 0.35rem 0.85rem;
}

.cate-content-lists .cate-subcategory {
    padding: 0.5rem 1.25rem;
    /*background-color: var(--light-gray);*/
    background-color: var(--light);
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--gray);
    transition: all 0.2s ease;
    white-space: nowrap;

    border-radius: 20px;
    cursor: pointer;
}

.cate-content-lists  .cate-subcategory:hover {
    background-color: var(--border);
    color: var(--primary);
    /*background-color: var(--border);*/
}

.cate-content-lists   .cate-subcategory.active {
    background-color: var(--primary);
    color: white;
}

.cate-content-lists  .cate-subcategory.active2 {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
    border: 1px solid var(--primary);
}
/* 列表里面多行二级栏目 结束 */


/* 通用底部样式 */
.footer {
    width: 100%;
}

.footer .nav-link {
    padding: 0.25rem 0;
    margin-right: 1rem;
    color: inherit;
}

.footer .nav-link:hover {
    color: #0d6efd;
}

.footer .social-links .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
    text-decoration: none;
}

